function application(main_path) {
    if (isBlank(main_path)) {
        main_path = "main";
    }
    var that = {
        parseConfig : function (key, beanConifg) {
            var path = key;
            if (!isEmptyProp(beanConifg, "path")) {
                path = beanConifg.path;
            }
            var obj = require(path);

            $sys.setBean("script",key, obj);
        }
    }


    var configs = require(main_path);

    for (var i in configs){
        var config = configs[i];
        for (var key in config){
            that.parseConfig(key, config[key]);
        }
    }
}